// 防具 属性计算
export function calcSP(data, name) {
    // console.log(data, name)
    
    let hp = data.ehp ? Number(data.ehp.split('+')[1]) : 0
    let ewlgj = data.ewlgj ? Number(data.ewlgj.split('+')[1]) : 0
    let mfzfl = data.emfzfl ? Number(data.emfzfl.split('+')[1]) : 0
    let wlzm = data.ewlzm ? Number(data.ewlzm.split('+')[1]) : 0

    

    let spTouKui = {}
    let spXiangLian = {}
    let spErHuanZ = {}
    let spErHuanY = {}
    let spJieZhiZ = {}
    let spJieZhiY = {}
    let spYaoDai = {}

    if (name == 'spTouKui') {
        spTouKui.hp = hp
        spTouKui.ewlgj = ewlgj
        spTouKui.mfzfl = mfzfl
        spTouKui.wlzm = wlzm
        return spTouKui
    }
    if (name == 'spXiangLian') {
        spXiangLian.hp = hp
        spXiangLian.ewlgj = ewlgj
        spXiangLian.mfzfl = mfzfl
        spXiangLian.wlzm = wlzm
        return spXiangLian
    }
    if (name == 'spErHuanZ') {
        spErHuanZ.hp = hp
        spErHuanZ.ewlgj = ewlgj
        spErHuanZ.mfzfl = mfzfl
        spErHuanZ.wlzm = wlzm
        return spErHuanZ
    }
    if (name == 'spErHuanY') {
        spErHuanY.hp = hp
        spErHuanY.ewlgj = ewlgj
        spErHuanY.mfzfl = mfzfl
        spErHuanY.wlzm = wlzm
        return spErHuanY
    }
    if (name == 'spJieZhiZ') {
        spJieZhiZ.hp = hp
        spJieZhiZ.ewlgj = ewlgj
        spJieZhiZ.mfzfl = mfzfl
        spJieZhiZ.wlzm = wlzm
        return spJieZhiZ
    }
    if (name == 'spJieZhiY') {
        spJieZhiY.hp = hp
        spJieZhiY.ewlgj = ewlgj
        spJieZhiY.mfzfl = mfzfl
        spJieZhiY.wlzm = wlzm
        return spJieZhiY
    }
    if (name == 'spYaoDai') {
        spYaoDai.hp = hp
        spYaoDai.ewlgj = ewlgj
        spYaoDai.mfzfl = mfzfl
        spYaoDai.wlzm = wlzm
        return spYaoDai
    }
}